/**
 * 由 WangYu 创建
 * 日期 2017/9/8
 */
import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    ToastAndroid, Button,
} from 'react-native';
import { NavigationActions } from 'react-navigation'
import {Actions} from "react-native-router-flux";
export default class TestPage extends Component {
    // static navigationOptions = ({navigation,screenProps}) => ({
    //     // 这里面的属性和App.js的navigationOptions是一样的。
    //     headerTitle:'测试页面',
    //     headerRight:(
    //         <Text style={{color:'red',width:44,}} onPress={()=>Actions.WebView({url:'www.mp4pa.com'})}>我的</Text>
    //     ),
    // });

//     static navigationOptions = ({navigation})=>({
// // head导航栏
//         title:'首页',
//         headerTintColor:'green',// 导航栏文字颜色
//         headerStyle:{
//             backgroundColor:'white', //导航条背景颜色
//         },
//         headerBackTitle:'返回',//返回按钮的值
//         headerLeft:(<TouchableOpacity onPress={()=>{
//             {/* navigation.navigate('CallScreen',{goback:this.gobackaction()}) */}
//             navigation.navigate('CallScreen',{mainkey:navigation.state.key,callback:'123',into:'456',lcback:(data)=>{
//                 //这里是回调
//             }})
//         }}>
//             <Text style={{backgroundColor:'white',fontSize:18,right:30,color:'red'}}>跳转</Text>
//         </TouchableOpacity>),
//     })

    constructor(props) {
        super(props);
    }

    render() {
        var url = 'https://img.meituan.net/180.160/msmerchant/f1c67c70e55a667d7d8be1781587f1393629023.jpg%40watermark%3D0';
        return (
            <View style={styles.container}>
                <View style={styles.itemStyle}>
                    <Image source={{uri:url}} style={{width:160,height:140}}/>
                    <View style={{flex:1,alignItems:'center'}}>
                        <View style={{flexDirection:'row',justifyContent:'space-around',backgroundColor:'red'}}>
                            <Text>dfaafdj</Text>
                            <Text>500mi</Text>
                        </View>
                    </View>
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
    },
    itemStyle:{
        height:160,
        backgroundColor:'white',
        flexDirection:'row',
        borderBottomWidth:1,
        borderBottomColor:'red',
        alignItems:'center',
    }
});
